{extend name="admin@index_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header">审核会员</div>
    <div class="layui-card-body">
        <table class="layui-hide" id="currentTable" lay-filter="currentTable"></table>
    </div>
</div>
<script type="text/html" id="barTool">
    <a data-open='{:url("edit")}?id={{ d.id }}' class="layui-btn layui-btn-xs">编辑</a>
    <a href='{:url("del")}?ids={{ d.id }}' class="layui-btn layui-btn-danger layui-btn-xs layui-tr-del">删除</a>
</script>
{/block}
{block name="script"}
<script>
layui.use('yznTable', function() {
    var table = layui.yznTable;

    var init = {
        table_elem: '#currentTable',
        delete_url: "{:url('del')}",
    };

    table.render({
        init: init,
        id: 'currentTable',
        elem: '#currentTable',
        toolbar: ['refresh', 'delete',
            [{
                html: '<a class="layui-btn layui-btn-sm confirm" data-href="{:url("pass")}" data-batch-all="currentTable">审核通过</a>',
            }],
        ],
        url: '{:url("userverify")}',
        cols: [
            [
                { type: 'checkbox', fixed: 'left' },
                { field: 'id', width: 100, title: '用户ID' },
                { field: 'username', width: 150, title: '用户名' },
                { field: 'nickname', width: 150, title: '昵称' },
                { field: 'email', title: '邮箱' },
                { field: 'reg_ip', title: '注册IP' },
                { field: 'last_login_time', title: '最后登录', search: 'range' },
                { field: 'amount', width: 120, title: '金钱总数' },
                { field: 'point', width: 120, title: '积分总数' },
                { field: 'login', width: 100, title: '登录次数' },
                { fixed: 'right', width: 120, title: '操作', templet: '#barTool' }
            ]
        ]
    });
});
</script>
{/block}